/*
   RS232Const.h
   
   Copyright (C) 2006 LinuxOne, Inc. <Republic of korea>

   This library is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1
   of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lessor General Public License for more details.

   You should have received a copy of the GNU Lessor General Public
   License along with this library; if not, write to the Free Software
   Foundation, inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

   Hyunjin Kim <mgc521@linuxone.co.kr>

   LinuxOne, Inc., hereby disclaims all copylight
   written by Hyunjin Kim, 20 December 2006
*/

#ifndef _BOOYO_POS_RS232CONST_H_
#define _BOOYO_POS_RS232CONST_H_

#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE	1
#endif // _POSIX_SOURCE

#ifndef TRUE
#define TRUE	1
#endif // TRUE

#ifndef FALSE
#define FALSE	0
#endif // FALSE

namespace booyopos
{

class CRS232Const
{
public:
	enum BaudRateValues
	{
		// already defined macro in termios.h
		BAUD_RATE_75=B75,
		BAUD_RATE_110=B110,
		BAUD_RATE_134=B134,
		BAUD_RATE_150=B150,
		BAUD_RATE_300=B300,
		BAUD_RATE_600=B600,
		BAUD_RATE_1200=B1200,
		BAUD_RATE_1800=B1800,
		BAUD_RATE_2400=B2400,
		BAUD_RATE_4800=B4800,
		//BAUD_RATE_7200=B7200,
		BAUD_RATE_9600=B9600,
		//BAUD_RATE_14400=B14400,
		BAUD_RATE_19200=B19200,
		BAUD_RATE_38400=B38400,
		BAUD_RATE_57600=B57600,
		BAUD_RATE_115200=B115200
	};

	enum DataBitsValues
	{
		DATA_BITS_4=4,
		DATA_BITS_5,
		DATA_BITS_6,
		DATA_BITS_7,
		DATA_BITS_8
	};

	enum ParityValues
	{
		PARITY_NONE,
		PARITY_EVEN,
		PARITY_ODD,
		PARITY_MARK,
		PARITY_SPACE
	};

	enum StopBitsValues
	{
		STOP_BITS_1=1,
		//STOP_BITS_1_5=1.5,
		STOP_BITS_2=2
	};

	enum FlowControlValues
	{
		FLOW_CONTROL_NONE,
		FLOW_CONTROL_XON_XOFF,
		FLOW_CONTROL_HARDWARE
	};

};

} // namespace booyopos

#endif // _BOOYO_POS_RS232CONST_H_
